package org.example.actualcombat.demos.web.modules.pms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.actualcombat.demos.web.modules.pms.model.PmsProductAttributeCategory;
import org.example.actualcombat.demos.web.modules.pms.model.PmsProductAttributeModel;
import org.example.actualcombat.demos.web.modules.pms.model.PmsProductCategoryModel;
import org.example.actualcombat.demos.web.modules.pms.model.dto.ProductAttributeCategoryDTO;

import java.util.List;

@Mapper
public interface PmsProductAttributeCategoryMapper extends BaseMapper<PmsProductAttributeCategory> {
//    Page list( Integer pageNum, Integer pageSize);
//    @Select("SELECT * FROM pms_product_category")
//    @Select("select pac.id,pac.name,pa.id attr_id,pa.name attr_name from pms_product_attribute_category pac left join pms_product_attribute pa on pac.id = pa.product_attribute_category_id and pa.type=1")
    List<ProductAttributeCategoryDTO> getListCategoryWithAttr();
}
